Ext.define('appmod.view.content.FileView', {
    extend: 'Ext.panel.Panel',
    alias: ['widget.content.fileview','widget.content-fileview'],
	region : 'center',
    layout : {
		type:'border'
	},
	requires: [
		//'appmod.view.content.Dtat-View'
	],	
	border : false,
	margins:"5 5 5 5",
    initComponent: function() {
		//--- this variable is set for winCat
		var me = this;
        Ext.applyIf(me, {
            items:[
				Ext.create('Ext.view.View', {
					tpl:[
		                '<tpl for=".">',
		                    '<div class="thumb-wrap" id="{name}">',
		                    '<div class="thumb"><img src="{url}" title="{name}"></div>',
		                    '<span class="x-editable">{shortName}</span></div>',
		                '</tpl>',
		                '<div class="x-clear"></div>'					
					],
		            multiSelect: true,
		            height: 310,
		            trackOver: true,
		            overItemCls: 'x-item-over',
		            itemSelector: 'div.thumb-wrap',
		            emptyText: 'No images to display'					
					
				})
			],

            dockedItems: [
				{
					xtype: 'toolbar',
	        		dock: 'top',
	        		items: [
	        		{
	        			text:'知识库管理',
	        			menu:{
	        				items:[
	        		        {
	        					seccomp:{
	        						id:'product-add'
	        					},
	        		        	text: '新增知识库',
								action:'showProductAddingForm'
	   		        		},
	        		        {
	        					seccomp:{
	        						id:'product-edit'
	        					},
	        		        	text: '更新知识库',
								action:'showProductEditingForm'
	   		        		},
	        		        	{
	        					seccomp:{
	        						id:'product-delete'
	        					},
	        		        	text: '删除知识库',
								action:'deleteProducts'
	   		        		}   		        		   		        		        				
	        				]
	        			}
	        		}
	        		]
	    		}
            ]			
        });
        me.callParent(arguments);
    },
	
	bindStore:function(store) {
		var me = this;
		
		var dataview = me.down('dataview');
		dataview.bindStore(store);
		
	}
});